package org.alvin.i18n.ui;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;

public class TimeTest {

    public static void main(String[] args) throws IOException {
//        for (int minute = 0; minute < 60; minute++) {
//            System.out.println("当前分钟数：" + minute);
//            int minuteSpace = 15;
//            System.out.println("数据间隔：" + minuteSpace);
//            int mult = minute / minuteSpace;
//            int minuteValue = mult * minuteSpace + minuteSpace;
//            if (minuteValue >= 60) {
//                System.out.println("小时 + 1");
//                System.out.println("分钟：" + 0);
//            } else {
//                System.out.println("分钟：" + minuteValue);
//            }
//        }

        byte[] buff = Files.readAllBytes(Paths.get("D:", "i18n_en.js"));
        String result = URLDecoder.decode(new String(buff, "utf-8"));
        Files.write(Paths.get("D:", "i18n_en_1.js"), result.getBytes(StandardCharsets.UTF_8));
    }
}
